Repository navigation
Implement retrieval v2 with Qwen, BM25 and reranking - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Qwen3-Embedding-8B retrieval, prepared BM25, Luna-low query expansion, protected fusion, Voyage rerank-2.5 and exact snapshot-owned excerpts through OpenRouter.
Generated assets stay outside Git. Build/check scripts acquire pinned, hash-verified tokenizer data into an ignored cache and embed it in the standalone executable. Benchmark replay restores its frozen bundle into ignored storage from a pinned historical commit. Source code, a concise license inventory, lockfiles, small manifests and maintained documentation remain tracked. The diff has 11,961 added lines; obsolete task docs and approximately 6.7 MB of generated JSON were removed.
The supplemental held-out diagnostic found useful evidence on 38/39 answerable questions, versus baseline 23/39 and full QMD 17/39. The original evaluation remains NO_ROLLOUT: eight actual searches were followed by 42 evaluator skips after unknown billing. A separate protocol collected only those 42 unexecuted questions. Its combined actual cohort includes one expansion failure, two unsupported nonempty answers and four unknown bills. Diagnostic gains do not replace failed acceptance; T07 release/scale/clean-machine checks remain conditional no-actions. Nothing merged.
Validation: 184 tests / 1,858 assertions, lint, formatting, strict types and standalone build pass. Real clean tokenizer acquisition, offline cache reuse, compiled Polish token counting without external assets, benchmark cache repair and offline replay pass. Independent numerical audit and all three final artifact reviews pass with no findings.
See docs/retrieval-v2-design.md, docs/retrieval-contracts.md and docs/evaluation/retrieval-v2-heldout.md. Reproduction instructions are in docs/evaluation/retrieval-v2-final/README.md. Shared-host timings and this small corpus do not establish general multilingual superiority.
License retention: docs/third-party.md records accepted licenses for pinned components and uses; revisit only on dependency/license/use changes. Seven full-text copies were removed. Builds restore tokenizer notices into ignored dist/THIRD_PARTY_NOTICES.txt, and CI packages that file with the executable. Corpus setup already restores its notices. Build, exact notice preservation, local links, lint/format/types and shallow/full-history plus release-package checks pass; all three final reviews pass.